package rentalstore;

import java.util.Vector;

/**
 * Statement
 *
 * @author Burgess Li
 * @createDate 2018/08/27 23:56
 */
public abstract class Statement {

    protected String buildType() {
        return this.getClass().getName();
    }

    abstract String generateHeader(String title);

    abstract String generateDetails(Vector rentals);

    abstract String generateFooter(double totalAmount, double totalFrequentRenterPoints);

    protected String generate(String title, Vector rentals, double totalAmount, double totalFrequentRenterPoints) {
        return this.generateHeader(title) + this.generateDetails(rentals) + this.generateFooter(totalAmount, totalFrequentRenterPoints);
    }

}
